/**
 * Copyright 2009 Marc Stogaitis and Mimi Sun
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gmote.server;
import java.awt.AWTException;
import java.awt.Image;
import java.awt.Menu;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.TrayIcon.MessageType;
import java.util.logging.Level;
// import org.gmote.server.settings.DefaultSettings;
import org.gmote.server.settings.DefaultSettingsEnum;
//import org.gmote.server.settings.StartupSettings;
import org.gmote.server.settings.StartupSettingsEnum;

/**
 * @author Mimi
 *
 */
public class GmoteServerUiWindows extends GmoteServerUi{
  private TrayIcon trayIcon;
  private PopupMenu popupMenu;
  private boolean mediaPlayerControlsVisible = false;
  private Menu settingsMenu;
  private MenuItem shuffleMenu = null;
  
  public GmoteServerUiWindows(GmoteServer server) {
    super(server);
  }
  
 /* public static void main(String[] args) {
    GmoteServer server = new GmoteServer();
    GmoteServerUi ui = new GmoteServerUiWindows(server);
    ui.sharedMain(args);
  }
  */
 public void initializeUi() {
    }
  
 public void addMediaPlayerControls() {
    if (!mediaPlayerControlsVisible) {
      popupMenu.insertSeparator(0);
      
      MenuItem item;
      item = new MenuItem("Pause");
      item.addActionListener(pauseListener);
      popupMenu.insert(item, 0);

      item = new MenuItem("Play");
      item.addActionListener(playListener);
      popupMenu.insert(item, 0);
      
      item = new MenuItem("Previous");
      item.addActionListener(previousListener);
      popupMenu.insert(item, 0);
      
      item = new MenuItem("Next");
      item.addActionListener(nextListener);
      popupMenu.insert(item, 0);
      
      mediaPlayerControlsVisible = true;
    }
  }
  
  public void removeMediaPlayerControls(){
    popupMenu.remove(0);
    popupMenu.remove(0);
    popupMenu.remove(0);
    mediaPlayerControlsVisible = false;
  }

 
}
